package com.hnevc.caoliuye;

public class Homework {
    public static void main(String[] args) {
        boolean[] light = new boolean[100];
        for (int a = 0; a < light.length; a++) {//for循环
            for (int b = 0; b < light.length; b++) {
                if ((a + 1) % (b + 1) == 0) {
                    light[a] = !light[a];
                }
            }
            System.out.print("第" + (a + 1) + "盏" + (light[a] ? "亮  " : "灭  "));//输出灯亮和灭的结果
        }
    }
}
